package 异常;

public class demo02_throw {
    public static void main(String[] args) {
        int[] arr = null;
        m1(arr , 0);
    }

    private static int m1(int[] arr,int index) {
        if(arr == null){
            throw new NullPointerException("qqqq");
        }
        return arr[index];
    }
}
